<template>
  <div>
    <el-card>
      <el-upload
        drag
        ref="uploadRef"
        :file-list="fileList"
        :show-file-list="false"
        :on-change="beforUpload"
        :limit="10"
        multiple
        :auto-upload="false"
      >
        <el-icon class="el-icon--upload"><upload-filled /></el-icon>
        <div class="el-upload__text">在这里放下文件或 <em>点击上传</em></div>
        <template #tip>
          <div class="el-upload__tip">上传的文件大小每个要小于500Mb</div>
        </template>
      </el-upload>
    </el-card>
  </div>
</template>
<script setup lang="ts">
import { ref } from "vue";
// import { uploadFile } from "@/api/files";
const fileList = ref([]);
const beforUpload = async (rawFile: any) => {
  console.log(rawFile);
  // const formdata = new FormData();
  // formdata.append('file', rawFile.raw);
  // const res = await uploadFile({ file: rawFile.raw });
  // console.log(res);
};
</script>
<style lang="scss" scoped></style>
